{% load attachment_tags %}

	

	{% get_attachments for object as attachment_list %}
	{% if attachment_list %}
    	<table border="0" cellpadding="0" cellspacing="0" class="full" >
    	    <caption>附件列表(Attached Files)</caption>
    		<tr>
    			<th>附件</th>
    			<th>摘要</th>
    			<th>上传</th>
    			<th>时间</th>
    			<th>删除</th>
    		</tr>
    		{%  for attachment in attachment_list %}
    			<tr  class="{% cycle odd,even %}" >
    				<td><a href="{{ attachment.file_url }}">{{ attachment.title  }}</a></td>
    				<td>{{ attachment.summary }}</td>
    				<td>{{ attachment.attached_by }}</td>
    				<td>{{ attachment.attached_timestamp }}</td>
    				<td>
    					<form style="display: inline;" action="{% url attachment_delete attachment_slug=attachment.slug %}" method="POST">
    						<input class="submit-btn" type="submit" value="删除" />
    					</form>
    				</td>
    			</tr>								
    		{% endfor %}
    	</table>
	{% endif %}
	
    	<div><form action="{% new_attachment_url object %}" method="GET">
    		<input class="submit-btn" type="submit" value="添加附件" />
    	</form></div>

